<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script src="./as.js"></script>
<script>
    
    // console.log(address);
    var arr = []
    let children = []
    address.forEach((e,i) => {
        // console.log(e.TopID);
        if(e.TopID == 0){
            arr.push(address[i])
            arr[i].children = []
        }
    });
    
    address.forEach((e,i) => {
        // if(e.TopID >= 1 && e.TopID <= 31){
        //     // console.log(arr[20].ID);
        //     console.log(i);
        //     if(e.TopID == arr[i].ID){
        //         arr[i].children.push(address[i])
        //     }
        // }
        // for (const key in e) {
        //     console.log(address[i].key);
        // }
    })
    console.log(arr);
    
    // console.log(arr[0].ID);

    // address.forEach((e,i) => {

    //     console.log(arr[i].ID)

        // if(arr[i].ID == e.TopID){
        //     console.log(address[i])
        //     arr[i].children.push(address[i])
        // }

    // })
    // debugger;
    function setN(obj){
            obj.name='屌丝';
            console.log('1',obj);
            obj = new Object();
            console.log('2',obj);
            obj.name = '腐女';
            console.log('3',obj);
        };

    var per = new Object();
    console.log('5',per);



    setN(per);
    console.log(per.name)
        // let obj = new Object()
        // obj.name = 'hong'
        // console.log(obj);
        // obj = new Object()
        // obj.name = 'ming'
        // console.log('2',obj);


</script>